﻿@page "/"
@namespace MASA.PM.Web.Admin.Pages
@using Masa.Contrib.StackSdks.Caller;
@using Microsoft.AspNetCore.Authentication;
@using Microsoft.IdentityModel.Protocols.OpenIdConnect;
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
    Layout = "_Layout";

    var tokens = new TokenProvider
    {
        AccessToken = await HttpContext.GetTokenAsync(OpenIdConnectParameterNames.AccessToken),
        RefreshToken = await HttpContext.GetTokenAsync(OpenIdConnectParameterNames.RefreshToken),
        IdToken = await HttpContext.GetTokenAsync(OpenIdConnectParameterNames.IdToken)
    };
}

<component type="typeof(MASA.PM.Web.Admin.App)" render-mode="ServerPrerendered" param-InitialState="tokens" />

